package de.uni.bremen.estudent.lbs.util;


import android.app.backup.BackupAgentHelper;
import android.app.backup.SharedPreferencesBackupHelper;


/**
 * BackupAgentHelper for the eStudent app. It will save the SharedPreferences of
 * every user in the android cloud.
 * http://developer.android.com/reference/android
 * /app/backup/SharedPreferencesBackupHelper.html
 * 
 * @author bahlfeld
 * @version 1.0 05.04.2012
 */
public final class EstudentBackupAgent extends BackupAgentHelper {

    /**
     * Key for the backupagent api.
     */
    private static final String MY_PREFS_KEY = "AEdPqrEAAAAIMLzIq1Ah0RuYrcW3xHjTcQ1e9AWG77XntYTrwA";

    /*
     * (non-Javadoc)
     * 
     * @see android.app.backup.BackupAgent#onCreate()
     */
    @Override
    public void onCreate() {
        SharedPreferencesBackupHelper helper = new SharedPreferencesBackupHelper(
                                        this, Constants.PREFS_NAME);
        addHelper(MY_PREFS_KEY, helper);
    }

}
